import Layout from '@/layout'

export default {
  path: '/system',
  component: Layout,
  redirect: '/system/flow',
  name: 'System',
  meta: { title: '系统设置', icon: 'setting', noCache: true, roles: ['system'] },
  children: [
    {
      path: 'flow',
      name: 'Flow',
      component: () => import('@/views/system/flow'),
      meta: { title: '流程控制', icon: 'star', noCache: true }
    },
    {
      path: 'app',
      name: 'App',
      component: () => import('@/views/system/app'),
      meta: { title: '应用控制', icon: 'star', noCache: true }
    },
    {
      path: 'basic',
      name: 'Basic',
      component: () => import('@/views/system/basic'),
      meta: { title: '基础设置', icon: 'star', noCache: true }
    },
    {
      path: 'home',
      name: 'Home',
      component: () => import('@/views/system/home'),
      meta: { title: '首页设置', icon: 'star', noCache: true }
    },
    {
      path: 'qrcode',
      name: 'Qrcode',
      component: () => import('@/views/system/qrcode'),
      meta: { title: '推广码', icon: 'star', noCache: true }
    },
    // {
    //   path: 'merchant',
    //   name: 'SystemMerchant',
    //   component: () => import('@/views/system/merchant'),
    //   meta: { title: '商家背景', icon: 'star', noCache: true }
    // },
    {
      path: 'nav',
      name: 'Nav',
      component: () => import('@/views/system/nav'),
      meta: { title: '导航图标', icon: 'list', noCache: true },
      redirect: '/system/nav/list',
      children: [
        {
          path: 'create',
          component: () => import('@/views/system/nav/create'),
          meta: { title: '创建导航', icon: 'star', noCache: true }
        },
        {
          path: 'edit/:id',
          component: () => import('@/views/system/nav/edit'),
          meta: { title: '编辑导航', icon: 'star', noCache: true },
          hidden: true
        },
        {
          path: 'list',
          component: () => import('@/views/system/nav/list'),
          meta: { title: '导航列表', icon: 'star', noCache: true }
        }
      ]
    },
    {
      path: 'swiper',
      name: 'Swiper',
      component: () => import('@/views/system/swiper'),
      meta: { title: '轮播图', icon: 'list', noCache: true },
      redirect: '/system/swiper/list',
      children: [
        {
          path: 'category',
          component: () => import('@/views/system/swiper/category'),
          meta: { title: '轮播图分类', icon: 'star', noCache: true }
        },
        {
          path: 'create',
          component: () => import('@/views/system/swiper/create'),
          meta: { title: '创建轮播图', icon: 'star', noCache: true }
        },
        {
          path: 'edit/:id',
          component: () => import('@/views/system/swiper/edit'),
          meta: { title: '编辑轮播图', icon: 'star', noCache: true },
          hidden: true
        },
        {
          path: 'list',
          component: () => import('@/views/system/swiper/list'),
          meta: { title: '轮播图列表', icon: 'star', noCache: true }
        }
      ]
    },
    {
      path: 'ad',
      name: 'Ad',
      component: () => import('@/views/system/ad'),
      meta: { title: '广告位', icon: 'list', noCache: true },
      redirect: '/system/ad/list',
      children: [
        {
          path: 'category',
          component: () => import('@/views/system/ad/category'),
          meta: { title: '广告分类', icon: 'star', noCache: true }
        },
        {
          path: 'create',
          component: () => import('@/views/system/ad/create'),
          meta: { title: '创建广告位', icon: 'star', noCache: true }
        },
        {
          path: 'edit/:id',
          component: () => import('@/views/system/ad/edit'),
          meta: { title: '编辑广告位', icon: 'star', noCache: true },
          hidden: true
        },
        {
          path: 'list',
          component: () => import('@/views/system/ad/list'),
          meta: { title: '广告位列表', icon: 'star', noCache: true }
        }
      ]
    },
    {
      path: 'wx',
      name: 'Wx',
      component: () => import('@/views/system/wx'),
      meta: { title: '微信', icon: 'star', noCache: true }
    },
    {
      path: 'payment',
      name: 'Payment',
      component: () => import('@/views/system/pay'),
      meta: { title: '支付', icon: 'star', noCache: true }
    },
    {
      path: 'sms',
      name: 'Sms',
      component: () => import('@/views/system/sms'),
      meta: { title: '短信', icon: 'star', noCache: true }
    },
    {
      path: 'logistics',
      name: 'Logistics',
      component: () => import('@/views/system/logistics'),
      meta: { title: '物流', icon: 'list', noCache: true },
      redirect: '/system/logistics/bird',
      children: [
        {
          path: 'bird',
          name: 'Bird',
          component: () => import('@/views/system/logistics/bird'),
          meta: { title: '快递鸟', icon: 'star', noCache: true }
        },
        {
          path: 'company',
          name: 'ExpressCompany',
          component: () => import('@/views/system/logistics/company'),
          meta: { title: '快递公司', icon: 'star', noCache: true }
        },
        {
          path: 'area',
          name: 'RemoteArea',
          component: () => import('@/views/system/logistics/area'),
          meta: { title: '偏远地区', icon: 'star', noCache: true }
        }
      ]
    }
  ]
}
